import Vue from 'vue'
import Router from 'vue-router'
import login from "@/page/login/login";
import The404 from "@/page/common/fourZeroFour";
import The500 from "@/page/common/fiveZeroZero";
import RouteList from "./views"
import commodityManagement from "@/page/commodityManagement/commodityManagement";
import contentManagement from "@/page/contentManagement/contentManagement"
import documentManagement from "@/page/contentManagement/documentManagement";
import managementActivities from "@/page/contentManagement/managementActivities";
import userManagement from "@/page/userManagement/userManagement";
import systemHome from "@/page/systemHome/systemHome";
import orderManagement from "@/page/orderManagement/orderManagement";
import inventoryManagement from "@/page/inventoryManagement/inventoryManagement";
import home from "@/page/home/home"
import mycom from "@/page/myCom/myCom"
import MultistageHeader from "@/page/MultistageHeader/MultistageHeader"
Vue.use(Router)
let RouterMain = new Router({
  routes: [
    {
      path: '/',
      name: 'login',
      component: login,
      meta:{
        title:"王霸之气登录页"
      }
    },
    {
      path:"/The404",
      name:"fourZeroFour",
      component:The404
    },
    {
      path:"/The500",
      name:"fiveZeroZero",
      component:The500
    },
    {
      path:"/home",
      name:"home",
      component:home,
      redirect:"/systemHome",
      children:[
        {
          path:"/systemHome",
          name:"systemHome",
          component:systemHome
        },
        {
          path:"/commodityManagement",
          name:"commodityManagement",
          component:commodityManagement
        },
        {
          path:"/contentManagement",
          name:"contentManagement",
          component:contentManagement,
          redirect:"/contentManagement/documentManagement",
          children:[
              {
                  path:"/contentManagement/documentManagement",
                  name:"documentManagement",
                  component:documentManagement,
              },
              {
                  path:"/contentManagement/managementActivities",
                  name:"managementActivities",
                  component:managementActivities
              }
          ]
        },
       
        {
          path:"/userManagement",
          name:"userManagement",
          component:userManagement
        },
        {
          path:"/orderManagement",
          name:"orderManagement",
          component:orderManagement
        },
        {
          path:"/inventoryManagement",
          name:"inventoryManagement",
          component:inventoryManagement
        },{
          path:"/mycom",
          name:"mycom",
          component:mycom
        },
        {
          path:"/MultistageHeader",
          name:"MultistageHeader",
          component:MultistageHeader
        }
      ]
    }
  ]
})
// RouterMain.addRoutes([...RouteList])
export default RouterMain

